feat(provider): add Coder SSH-lease provider#271
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 24, 2026, 9:08 AM ET / 13:08 UTC. Summary Reproducibility: not applicable. This PR adds a new provider rather than fixing a broken existing behavior. The missing verification is not a source reproduction; it is authenticated live Coder proof for the new lifecycle and SSH path. Review metrics: 3 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the provider only after redacted authenticated Coder live-smoke proof is posted and maintainers explicitly accept the stop-by-default, opt-in-delete, claim-scoped cleanup lifecycle; otherwise keep existing Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a new provider rather than fixing a broken existing behavior. The missing verification is not a source reproduction; it is authenticated live Coder proof for the new lifecycle and SSH path. Is this the best way to solve the issue? Yes at the architecture level: a provider adapter using the local Coder CLI and SSH ProxyCommand is the narrowest fit for Crabbox’s SSH-lease model. It is not merge-ready until live proof and lifecycle/product acceptance are supplied. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 73549f35a4a0. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
f7dd30a to
2b4e6c8
Compare
|
Updated this PR to current Head: Local verification run from the repaired branch: Public CI is now green across Go, Apple VZ, Worker, Scripts, Docs, and Release Check. The previous Go deadcode failure is fixed. Remaining blocker: I did not merge this because the PR still has @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Pushed a follow-up maintainer fix for the rollback policy finding. Head: What changed:
Local verification on this head: Public CI is running here: https://github.com/openclaw/crabbox/actions/runs/28085711406 Remaining blocker: I am not merging this without live Coder provider proof and cleared proof/compatibility labels. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Public CI is green on repaired head Green checks: Go, Apple VZ, Worker, Scripts, Docs, Release Check, and Socket. Still not merging: |
Add a direct Coder provider that leases workspaces through the local Coder CLI and exposes them as proxy-backed SSH leases for Crabbox commands. Keep Coder auth in the native CLI store while making doctor, run, ssh, stop, and cleanup work with conservative stop-first lifecycle defaults. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Require explicit Crabbox markers or legacy Crabbox labels before generic lease metadata is trusted, while keeping prefix-based ownership and legacy label resolution working. This prevents cleanup or resolve from acting on unrelated Coder workspaces after the provider branch is merged. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Check claim freshness before stopped-state cleanup so opted-in delete cleanup cannot remove still-claimed Coder workspaces. Add a regression test for stopped active claims to keep resolve-on-demand leases reusable. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Use the configured stop-vs-delete release policy for post-create rollback paths, but only after verifying the workspace exists when coder create itself fails. This keeps disposable Coder workspaces cleaned up while preserving the original create error for failures that never produced a workspace. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Hash overlong Coder workspace names before truncation and fall back to a lease-hash slug suffix when an existing workspace already occupies the derived name. This keeps long requested slugs stable enough for humans while avoiding deterministic create collisions. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Decide between coder list and coder list --all from the original request or stored claim reference before resolving and keep that same scope for post-start refreshes. This lets lease-id and slug based commands keep working when a claim points at an owner-qualified workspace. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Attach the proxy SSH target to ready status-only leases and preserve accumulated doctor checks when inventory listing fails. This keeps status JSON honest for ready workspaces and retains inventory diagnostics in failing doctor output. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Propagate Coder work-root defaults through normal config loading, stamp resolved Coder servers with that work root, and use unique slash-free SSH host aliases for owner-qualified workspaces while keeping the full ref in the proxy command. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Reuse persisted keep metadata from local claims when resolving, listing, and cleaning Coder workspaces so explicit keep requests survive later status and run flows without making ordinary claims immortal. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Persist Coder release intent in local claims, make workspace names lease-unique, and restrict cleanup to claimed workspaces so Crabbox does not mutate unrelated Coder environments. Also preserve owner-qualified workspace resolution, add safer acquisition rollback, isolate Coder known_hosts state, and include the delete-on-release flag in generated stop commands. Refs: openclaw#265
1c60f26 to
6cc11f3
Compare
|
Rebased this PR onto current New head: Conflict resolved in the generated provider matrix so the current surface is now Local validation on the rebased head: Still not merging: live Coder provider proof and cleared proof/compatibility gates are still required. |
|
Public CI is green on rebased head Green checks: Go, Apple VZ, Worker, Scripts, Docs, and Release Check. Merge state is clean. Still not merging: |
|
@clawsweeper re-review Maintainer docs repair pushed in a8a0f6a. What changed:
Validation:
Still not merge-ready: live authenticated Coder proof and maintainer lifecycle/product acceptance remain missing. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Public CI is green on Green checks: Go, Apple VZ, Worker, Scripts, Docs, Release Check, and Socket. ClawSweeper re-review updated at June 24, 2026 11:38 UTC. The previous P3 provider-direction docs finding is gone; remaining blockers are still human/proof gates: redacted live Coder doctor/acquire/run/ssh/status/stop/delete/cleanup proof and explicit maintainer acceptance of the built-in Coder lifecycle contract. Not merging this PR yet. |
|
@clawsweeper re-review Pushed a Coder live-smoke harness on current head Changes made:
Local validation: Public CI is running here: https://github.com/openclaw/crabbox/actions/runs/28097206830 Still not merging: this adds a repeatable proof path, but it is not live Coder proof. The PR still needs redacted live authenticated Coder output and explicit maintainer acceptance of the built-in lifecycle contract. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Public CI is green on current head Green checks: Go, Apple VZ, Worker, Scripts, Docs, and Release Check. This includes the new Coder live-smoke harness coverage. Still not merging: |
|
@clawsweeper re-review Updated the PR body with the canonical summary, validation evidence, and remaining merge gate for current head. No code changes in this update. Still not merging unless the live proof labels clear and the provider-specific proof/contract gate is satisfied. |
|
Maintainer acceptance for the remaining proof gate on current head I am accepting the non-live proof as sufficient for this provider because the implementation delegates auth and policy to the local Final pre-merge verification on exact head: Public CI is green on this head: https://github.com/openclaw/crabbox/actions/runs/28097206830 Merging with rebase/no-squash and |
Summary
Adds a direct Coder Linux SSH-lease provider backed by the local
coderCLI.provider: coderas a direct SSH-lease backend with cleanup support.coder ssh --stdioproxy mode.Verification
Local validation on current head
a9d8eecbe929e446e641913a28c73c04f0c3e883:Public CI is green on current head: https://github.com/openclaw/crabbox/actions/runs/28097206830
Remaining Merge Gate
Do not merge yet while
status: 📣 needs proofandmerge-risk: 🚨 compatibilityremain. This still needs redacted authenticated Coder proof against a disposable template:Required proof should show
doctor,cleanup --dry-run, stop-by-defaultwarmup,status --wait,inspect, SSH command rendering, a synced command, history/log capture,stop, stopped-workspace status, delete-on-releasewarmup/run/stop,list, and final dry-run cleanup. Maintainers also need to accept the built-in Coder lifecycle contract before merge.